using System;
using System.Collections.Generic;
using OS.Infrastructure.Domain;
using OS.Infrastructure.NHibernate;
using OS.Infrastructure.NHibernate.Repositories;

namespace Domain.NHibernate
{
    public class UrlRepository : BaseRepository<Url>, IUrlRepository
    {
        public UrlRepository(ISessionProvider sessionProvider, ILinqProvider linqProvider) : base(sessionProvider ,linqProvider)
        {
            
        }
        public IList<Url> GetUrlByAnonymous(string anonymous)
        {
            return Session.QueryOver<Url>().Where(x => x.Anonymous==anonymous).List();
        }
        public IList<Url> GetUrlByAccount(Account account)
        {
            return Session.QueryOver<Url>().Where(x => x.Account == account).List();
        }
    }
}